package cn.exrick.xboot.modules.your.graphics;

import cn.exrick.xboot.XbootApplication;
import cn.exrick.xboot.modules.graphics.entity.GraphicsPage;
import cn.exrick.xboot.modules.graphics.param.GraphicsPageParam;
import cn.exrick.xboot.modules.graphics.service.IGraphicsPageService;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

import static org.junit.Assert.*;

/**
 * Created with IntelliJ IDEA.
 *
 * @Auther: njp
 * @Date: 2020/09/08/11:44
 * @Description:
 */
@RunWith(SpringRunner.class)
@SpringBootTest(classes = XbootApplication.class, webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT)
public class IGraphicsPageServiceImplTest {
    @Autowired
    private IGraphicsPageService iGraphicsPageService;
    @Test
    public void detail() {
        GraphicsPageParam graphicsPageParam = new GraphicsPageParam();
        graphicsPageParam.setId("11");
        GraphicsPage detail = iGraphicsPageService.detail(graphicsPageParam);
        System.out.println("20200920测试："+detail.toString());

    }

    @Test
    public void delete() {
        GraphicsPageParam graphicsPageParam = new GraphicsPageParam();
        graphicsPageParam.setId("11");
        boolean delete = iGraphicsPageService.delete(graphicsPageParam);
        System.out.println("20200920测试："+delete);
    }

    @Test
    public void startGraphicsPage() {
        GraphicsPageParam graphicsPageParam = new GraphicsPageParam();
        graphicsPageParam.setId("11");
        iGraphicsPageService.startGraphicsPage(graphicsPageParam);
    }

    @Test
    public void copyGraphicsPage() {
        GraphicsPageParam graphicsPageParam = new GraphicsPageParam();
        graphicsPageParam.setId("11");
        graphicsPageParam.setOrgId("0000000");
        iGraphicsPageService.copyGraphicsPage(graphicsPageParam);
    }

    @Test
    public void getGPbyOrjAndStatus() {
        GraphicsPageParam graphicsPageParam = new GraphicsPageParam();
        graphicsPageParam.setOrgId("123456");
        GraphicsPage gPbyOrgAndStatus = iGraphicsPageService.getGPbyOrgAndStatus(graphicsPageParam);
        System.out.println("20200916测试："+gPbyOrgAndStatus.toString());
    }
}